package com.example.tictactoeandroid;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View; 
import android.widget.EditText; 
import android.content.Intent;


public class MainActivity extends Activity {
	
	public static final String EXTRA_MESSAGE = "com.example.tictactoeandroid.username";
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}
	

	public void startGame(View view){
		Intent intent = new Intent(this, GameBoardActivity.class); 
		EditText userNameField = (EditText)findViewById(R.id.userName); 
		String userName = userNameField.getText().toString(); 
		intent.putExtra(EXTRA_MESSAGE, userName);
		startActivity(intent);
	}

}
